var express = require('express');
var router = express.Router();

/* GET home page. */
router.use(function(req, res, next){
  console.log("index all");
  next();
});
router.get('/', function(req, res, next) {
  res.render('index/index', { title: 'Express' });
});
router.get('/index', function(req, res, next) {
    res.send("hello world index");
});

router.get('/index/a', function(req, res, next) {
    req.params.name='zht';
    next();
},function(req, res){
    res.send("hello world index a "+req.params.name);
});

module.exports = router;
